package com.freeman.cement.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.freeman.cement.entity.ShiftRecord;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

@Mapper
public interface ShiftDao extends BaseMapper<ShiftRecord> {
    int addShiftRecord(ShiftRecord record);

    int updateShiftRecord(ShiftRecord record);

    //找到值班室最近一条的交班记录
    ShiftRecord findLatestShiftRecordByDutyRoomId(@Param("deptid") int dutyRoomId);

    List<ShiftRecord> selectShiftRecord( @Param("shiftRecord") ShiftRecord shiftRecord, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
}
